package com.translate.web.service.impl;

import com.translate.web.dao.NoticeReadedMapper;
import com.translate.entity.Notice;
import com.translate.entity.NoticeReaded;
import com.translate.web.service.INoticeReadedService;
import com.basic.service.impl.BaseServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class NoticeReadedServiceImpl extends BaseServiceImpl<NoticeReaded> implements INoticeReadedService {
	public NoticeReadedServiceImpl(NoticeReadedMapper mapper) {
		super(mapper);
	}

	protected void insertPropteris(NoticeReaded data) {
		long time = System.currentTimeMillis() / 1000;
		data.setReadTime(time);
	//	data.setUpdateTime(time);
	}

	protected void updatePropteris(NoticeReaded data) {
//	data.setUpdateTime(System.currentTimeMillis() / 1000);
	}

	protected Class<NoticeReaded> getEntityClass() {
		return NoticeReaded.class;
	}

	@Override
	public List<NoticeReaded> selectNotice(int[] ids, int userId) {
		
		NoticeReadedMapper mapper = this.getBaseMapper();
		
		return mapper.selectNotice(ids, userId);
	}
}